import {defineStore} from "pinia"
import {ref} from 'vue'
import {ClassManagementApi} from '@/api'
export default defineStore("ClassManagement",()=>{
    const list=ref<Vm.ClassModel[]>([]);
    const isInit = ref<Boolean>(false)
    const init=async()=>{
        if(isInit.value) return
        list.value=await ClassManagementApi.getAll()
        isInit.value = true
    }
    return {list,init}
})